onChatElementReceived

open fun onChatElementReceived(chatElement: ChatElement)

Called when a new chat element is received from the chat engine.

This method is invoked for every element delivered during the conversation, including messages loaded from history when reconnecting to an existing session.

The websocket connection can close when the application enters background, preventing elements from being received until reconnection.

Parameters